using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_admin_ycodes : System.Web.UI.Page
{
    protected void YCodeCreated(object sender, EventArgs e)
    {
        mviewYCodes.SetActiveView(viewGrid);
        YCodeGrid1.Refresh();
    }
    protected void lnkBack_Click(object sender, EventArgs e)
    {
        mviewYCodes.SetActiveView(viewGrid);
    }
    protected void lnkAdd_Click(object sender, EventArgs e)
    {
        mviewYCodes.SetActiveView(viewAdd);
    }

    protected void YCodeSelected(object sender, EventArgs e)
    {
        mviewYCodes.SetActiveView(viewModify);
        ModifyYCode1.CurrentYCode = YCodeGrid1.CurrentYCode;
    }

    protected void YCodeModified(object sender, EventArgs e)
    {
        YCodeGrid1.Refresh();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Managers.UserLoginManager.CurrentUser.HasPermissions(DAL.User.UserStatus.Administrator))
        {
            Response.Redirect("~/default.aspx");
        }
    }
}
